Results 1 to 2 of 2

Thread: Unicode Collation Sorting using QCollator in Qt 5.2

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Unicode Collation Sorting using QCollator in Qt 5.2

    Hi

    I have to sort English, Unicode , Numeric, Expression string.
    I didn't find properly to sort these correctly. In MacOSX Finder or OSX using Unicode collation Sorting algorithm, in which 'a' and 'A' treated same in sorting.

    In Qt 5.2, I found there is one class QCollator, which sort items according to Unicode collator sorting.

    But i didn't find any example or help sample code for this.

    Can anybody help me in sorting using QCollator.

    Thanks
    Santosh

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Unicode Collation Sorting using QCollator in Qt 5.2

    Not sure what you are looking for? Its compare() method's documentation seems to be pretty self explanatory.

    Cheers,
    _

Similar Threads

  1. Unicode strings int Qt 4.2.1
    By mkrentovskiy in forum Qt Programming
    Replies: 12
    Last Post: 29th December 2011, 09:02
  2. QString and Unicode
    By juanjo_de_la_pradera in forum Qt Programming
    Replies: 0
    Last Post: 23rd September 2010, 13:38
  3. Unicode
    By qtuser20 in forum Qt Programming
    Replies: 0
    Last Post: 28th September 2009, 21:43
  4. source in unicode 4.0
    By conexion2000 in forum Qt Programming
    Replies: 1
    Last Post: 10th August 2007, 11:28
  5. Unicode + plain C++
    By ct in forum General Programming
    Replies: 7
    Last Post: 20th March 2007, 07:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.